JavaScript is required. Please enable it to continue.
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
!!<<print $city.name>> City Council A new month begins. What would you like to do? <table> <tr><td> [[ [1] Palace|palace]] [[ [2] Laws|laws]] [[ [3] Security|security]] [[ [4] Finances|finance]] [[ [5] Food|farms]] [[ [6] Production|industry]] [[ [7] City|city]] [[ [8] Research|tech]] [[ [9] Workers|workers]] </td> <td> Go to the palace, the personal residence of the $gt.title. Open the lawbook, and consider making some changes. Visit the barracks to review your security situation. Review the city's finances. Inspect the farms, to manage food production. Visit the workshops, the manufacturing heart of the city. Tour the urban center, and adjust its development strategy. Visit the labs, to review the technological progress of the city. Review the labor ledger, for an overview of the workforce. </td> </tr> </table> [[ [Enter] End Turn|turnHandler]]
/* Base stats */ <<set $turn to 1, $year to 2347, $month to random(1,12) >> <<set $baseFarmProd to 1.8, $baseFoodDecayRate to 3, $baseScrapProd to 1, $basePopGrowth to 0.010, $basePopDeath to 0.008, $baseGrowthRate to 0.2, $baseLackOfFoodHappinessDrop to 15, $baseFavorDecayRate to 2, $baseWrathDecayRate to 2, $baseFarmerTax to 0.2, $baseScavengerTax to 0.4, $baseServiceTax to 1, $baseFreePopTax to 0, $baseEngineerTax to 0.3, $baseScientistTax to 0.2, $baseSoldierTax to 0, $baseServantTax to 0, $baseSafetyDecayRate to 5, $baseLandPerSoldier to 35, $basePopPerSoldier to 1000, $soldiersSafetyCap to 50, $basePopPerService to 10, $baseFeetPerServant to 10, $baseHappinessDecayRate to 5, $servantsSatisfactionCap to 50, $basePopPerService to 500, $baseApprovalDecayRate to 5 >> /* giant stats */ /* stats are on a 1-100 scale, with 50 being average */ /* size tracks the height in feet */ <<set $gt to { name: "unknwon", title: "Lady", sex: "female", trueAge: 20, apparentAge: 20, size: 30, weight: 50, muscles: 50, boobs: 50, ass: 50, dick: 50, health: 50, energy: 50, hungerBase: 1, hungerAdjusted: 1/100, lustBase: 1, funBase: 1, socialBase: 1, mood: "indifferent", happiness: 50, humanity: 50, trust: 50, favor: 0, wrath: 0, fame: 0, dread: 0, armor: "none", weapon: "none", traits: [] } >> /* City stats */ /* point of land/food is equal to what is needed to feed 100 for 1 month */ <<set $city to { name: "Dustspring", pop: 4000 + random(0,500), land: 50, foodStored: 100, scrap: 100, money: 100, approval: 20, safety: 20 } >> /* worker stats */ <<set $workers to { freePops: Math.trunc($city.pop / 100), farmers: 0, scavengers: 0, service: 0, soldiers: 0, scientists: 0, engineers: 0, servants: 0 } >> /* scheduled tasks */ <<set $clearFields to 0, $abandonFields to 0 >> /* Auxiliary variables */ <<set $physicalTrait to "none", $historyTrait to "none", $gtFoodConsumption to 0, $cityFoodConsumption to 0, $foodConsumed to 0, $foodProduced to 0, $foodTraded to 0, $notEnoughFoodProduced to false, $foodScarcity to false, $turnsOfFamine to 0, $foodDeficit to 0, $foodLost to 0, $lostToHunger to 0, $newborn to 0, $naturalDead to 0, $migrants to 0, $popDiff to 0, $growth to 0, $taxRevenue to 0, $farmTax to 0, $scavTax to 0, $serviceTax to 0, $soldierTax to 0, $engineerTax to 0, $scientistTax to 0, $freePopTax to 0, $income to 0, $soldiersRequired to 0, $serviceRequired to 0, $servantsRequired to 0, $farmersRequired to 0, $safetyChange to 0, $approvalChange to 0, $satisfactionChange to 0, $areReqMatched to false >> /* Variables for statistics */ <<set $old to { pop: 0, land: 0, foodStored: 0, foodConsumed: 0, foodProduced: 0, safety: 0, happiness: 0, approval: 0 } >>
''<<print $gt.title>>'': <<display "gtReport">> ''Population'': <<display "popReport">> ''Finances'': <<display "financeReport">> ''Security'': <<display "securityReport">> ''Food'': <<display "foodReport">> ''Scrap'': <<display "scrapReport">> [[Continue|mainWindow]] <<checkWorkerCount>> <<readjustWorkers>>
!!The Labor Ledger Here you can see all workers in the city, and their assignments. For a more detailed explanation about each role and requirements, see their relative page. <<updateAllRequired>> <div class="workerGrid"> <div class="grid-item"> ''Free workers'': @@color:yellow;<<print $workers.freePops>>@@ <<display "general worker buttons">> </div> <div class="grid-item"> ''Farmers'': @@color:yellow;<<print $workers.farmers>>@@/@@color:yellow;<<print $farmersRequired>>@@. Max: @@color:yellow;<<print $city.land>>@@ <<display "farm buttons">> </div> <div class="grid-item"> ''Servants'': @@color:yellow;<<print $workers.servants>>@@/@@color:yellow;<<print Math.trunc($gt.size / $baseFeetPerServant)>>@@. <<display "servant buttons">> </div> <div class="grid-item"> ''Military'': @@color:yellow;<<print $workers.soldiers>>@@/@@color:yellow;<<print Math.trunc($city.land / $baseLandPerSoldier) + Math.trunc($city.pop / $basePopPerSoldier)>>@@ <<display "soldier buttons">> </div> <div class="grid-item"> ''Service Workers'': @@color:yellow;<<print $workers.service>>@@/@@color:yellow;<<print Math.trunc($city.pop / $basePopPerService)>>@@ <<display "service buttons">> </div> <div class="grid-item"> ''Scavengers'': @@color:yellow;<<print $workers.scavengers>>@@ <<display "scrap buttons">> </div> <div class="grid-item"> scientists </div> <div class="grid-item"> engineers </div> </div> [[ [Spacebar] Back|mainWindow]]
<<widget p>><<if $gt.sex is "female">>she<<else>>he<</if>><</widget>> <<widget pc>><<if $gt.sex is "female">>She<<else>>He<</if>><</widget>> <<widget pp>><<if $gt.sex is "female">>her<<else>>his<</if>><</widget>> <<widget ppc>><<if $gt.sex is "female">>Her<<else>>His<</if>><</widget>> <<widget po>><<if $gt.sex is "female">>her<<else>>him<</if>><</widget>> <<widget poc>><<if $gt.sex is "female">>Her<<else>>Him<</if>><</widget>> <<widget gender>><<if $gt.sex is "female">>woman<<else>>man<</if>><</widget>> <<widget genderC>><<if $gt.sex is "female">>Woman<<else>>Man<</if>><</widget>> <<widget sex>><<if $gt.sex is "female">>female<<else>>male<</if>><</widget>> <<widget sexC>><<if $gt.sex is "female">>Female<<else>>Male<</if>><</widget>>
<<nobr>> /* quick update to relevant variables */ <<updateFoodConsumption>> Add: /* buttons */ <<if $workers.freePops >= 1 && ($workers.farmers + 1) <= $city.land>> <<link "1">> <<set $workers.freePops-->> <<set $workers.farmers++>> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.freePops >= 5 && ($workers.farmers + 5) <= $city.land>> <<link "5">> <<set $workers.freePops to $workers.freePops - 5>> <<set $workers.farmers to $workers.farmers + 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.freePops >= 10 && ($workers.farmers + 10) <= $city.land>> <<link "10">> <<set $workers.freePops to $workers.freePops - 10>> <<set $workers.farmers to $workers.farmers + 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.freePops >= 20 && ($workers.farmers + 20) <= $city.land>> <<link "20">> <<set $workers.freePops to $workers.freePops - 20>> <<set $workers.farmers to $workers.farmers + 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.freePops >= 50 && ($workers.farmers + 50) <= $city.land>> <<link "50">> <<set $workers.freePops to $workers.freePops - 50>> <<set $workers.farmers to $workers.farmers + 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> Remove: <<if $workers.farmers >= 1>> <<link "1">> <<set $workers.freePops++>> <<set $workers.farmers-->> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.farmers >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops + 5>> <<set $workers.farmers to $workers.farmers - 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.farmers >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops + 10>> <<set $workers.farmers to $workers.farmers - 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.farmers >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops + 20>> <<set $workers.farmers to $workers.farmers - 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.farmers >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops + 50>> <<set $workers.farmers to $workers.farmers - 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> <<if $farmersRequired > $workers.farmers && $workers.freePops >= $farmersRequired && $workers.farmers < $city.land && $farmersRequired <= $city.land>> <<link "Auto">> <<if $workers.freePops > ($farmersRequired - $workers.farmers)>> <<set $workers.freePops to $workers.freePops - ($farmersRequired - $workers.farmers)>> <<set $workers.farmers to $farmersRequired>> <<goto "workers">> <<else>> <<set $workers.farmers to $workers.farmers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</link>> <<else>> Auto <</if>>| <<if $workers.freePops >= 1 && $workers.farmers < $city.land>> <<link "Add All">> <<if $workers.freePops > ($city.land - $workers.farmers)>> <<set $workers.freePops to $workers.freePops - ($city.land - $workers.farmers)>> <<set $workers.farmers to $city.land>> <<goto "workers">> <<else>> <<set $workers.farmers to $workers.farmers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</link>> <<else>> Add All <</if>>| <<if $workers.farmers > 0>> <<link "Remove All">> <<set $workers.freePops to $workers.freePops + $workers.farmers>> <<set $workers.farmers to 0>> <<goto "workers">> <</link>> <<else>> Remove All <</if>> <</nobr>>
<<if $old.land < $city.land>>As planned, @@color:yellow;<<print $city.land - $old.land>>@@ fields were cleared and they are ready for use. <<elseif $old.land > $city.land>>As planned, @@color:yellow;<<print $old.land - $city.land>>@@ fields were abandoned. <</if>>This month, the city has produced $foodProduced units of food, while $foodConsumed were consumed.<<if $foodScarcity>> The city is short @@color:red;$foodDeficit@@ units and its granaries are @@color:red;empty@@, some of your citizens will have to go hungry.<<elseif $notEnoughFoodProduced>> The city is not producing enough food to support itself, you have lost @@color:red;<<print $old.foodStored - $city.foodStored>>@@ units of stored food. With $city.foodStored units left in storage, your reserves will be exhausted in <<print Math.trunc($city.foodStored / ($foodConsumed - $foodProduced))>> months.<<elseif ($foodProduced - $foodConsumed) > 0>> There is a surplus of @@color:lightGreen;<<print $foodProduced - $foodConsumed>>@@ units of food. <</if>> <<if $foodLost > 0>>Some of your stored food has spoiled, you lost @@color:red;$foodLost@@ units this month. <</if>>Your granaries contain $city.foodStored units.
<<nobr>> /* The food consumption fo the giant is equal to its relative scale factor (number of times they are larger than a 6 ft human) to the power of three, all mutiplied for his/her base hunger value */ /* For normal humans, one unit of food feeds 100 people */ /* Updating variables */ <<set $old.land to $city.land>> <<set $old.foodStored to $city.foodStored>> <<set $old.foodConsumed to $foodConsumed>> <<set $old.foodProduced to $foodProduced>> /* Managing fields */ <<if $clearFields > 0>> <<set $city.land to $city.land + $clearFields>> <<set $clearFields to 0>> <<elseif $abandonFields > 0>> <<set $city.land to $city.land - $abandonFields>> <<set $abandonFields to 0>> <<if $workers.farmers > $city.land>> <<set $workers.freePops to $workers.freePops + ($workers.farmers - $city.land)>> <<set $workers.farmers to $city.land>> <</if>> <</if>> <<updateFoodConsumption>> <<set $foodProduced to Math.trunc($workers.farmers * $baseFarmProd)>> /* Calculation */ <<if $city.foodStored + $foodProduced < $foodConsumed>> <<set $foodScarcity to true>> <<set $turnsOfFamine++>> <<set $foodDeficit to $foodConsumed - ($city.foodStored + $foodProduced)>> <<set $city.foodStored to 0>> <<elseif $foodProduced < $foodConsumed>> <<if $turnsOfFamine > 0>> <<set $turnsOfFamine to Math.clamp($turnsOfFamine - 1, 0, $turnsOfFamine)>> <</if>> <<set $notEnoughFoodProduced to true>> <<set $foodScarcity to false>> <<set $foodDeficit to 0>> <<set $city.foodStored to Math.trunc($city.foodStored + $foodProduced - $foodConsumed)>> <<else>> <<if $turnsOfFamine > 0>> <<set $turnsOfFamine to Math.clamp($turnsOfFamine - 2, 0, $turnsOfFamine)>> <</if>> <<set $foodScarcity to false>> <<set $notEnoughFoodProduced to false>> <<set $foodDeficit to 0>> <<set $city.foodStored to Math.trunc($city.foodStored + $foodProduced - $foodConsumed)>> <</if>> /* food decay */ <<set $foodLost to Math.trunc($city.foodStored * $baseFoodDecayRate / 100)>> <<if $foodLost >= 1>> <<set $city.foodStored to $city.foodStored - $foodLost>> <<else>> <<set $foodLost to 0>> <</if>> <</nobr>>
<<widget updateAllRequired>><<nobr>> <<updateFoodConsumption>> <<updateServantsRequired>> <<updateServiceRequired>> <<updateSoldiersRequired>> <</nobr>><</widget>> <<widget updateFoodConsumption>><<nobr>> <<set $scaleFactor to $gt.size / 6>> <<set $gtFoodConsumption to Math.trunc($gt.hungerAdjusted * ($scaleFactor * $scaleFactor * $scaleFactor))>> <<if $gtFoodConsumption < 1>> <<set $gtFoodConsumption to 1>> <</if>> <<set $cityFoodConsumption to Math.trunc($city.pop / 100)>> <<set $foodConsumed to $gtFoodConsumption + $cityFoodConsumption + $foodTraded>> <<set $farmersRequired to Math.trunc($foodConsumed / $baseFarmProd)>> <<if Math.trunc($farmersRequired * $baseFarmProd) < $foodConsumed>> <<set $farmersRequired++>> <</if>> <</nobr>><</widget>> <<widget updateSoldiersRequired>><<nobr>> <<set $soldiersRequired to (Math.trunc($city.land / $baseLandPerSoldier) + Math.trunc($city.pop / $basePopPerSoldier))>> <</nobr>><</widget>> <<widget updateServantsRequired>><<nobr>> <<set $servantsRequired to Math.trunc($gt.size / $baseFeetPerServant)>> <</nobr>><</widget>> <<widget updateServiceRequired>><<nobr>> <<set $serviceRequired to Math.trunc($city.pop / $basePopPerService)>> <</nobr>><</widget>> <<widget readjustWorkers>><<nobr>> <<set _actualWorkerCount to Math.trunc($city.pop / 100)>> <<set _oldFarm to $workers.farmers, $workers.farmers to 0>> <<set _oldScav to $workers.scavengers, $workers.scavengers to 0>> <<set _oldSol to $workers.soldiers, $workers.soldiers to 0>> <<set _oldServ to $workers.servants, $workers.servants to 0>> <<set _oldEngi to $workers.engineers, $workers.engineers to 0>> <<set _oldScie to $workers.scientists, $workers.scientists to 0>> <<set _oldService to $workers.service, $workers.service to 0>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldFarm && _oldFarm > 0>> <<set $workers.farmers to _oldFarm>> <<set _actualWorkerCount to (_actualWorkerCount - _oldFarm)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldFarm>> <<set $workers.farmers to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldServ && _oldServ > 0>> <<set $workers.servants to _oldServ>> <<set _actualWorkerCount to (_actualWorkerCount - _oldServ)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldServ>> <<set $workers.servants to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldService && _oldService > 0>> <<set $workers.service to _oldService>> <<set _actualWorkerCount to (_actualWorkerCount - _oldService)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldService>> <<set $workers.service to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldSol && _oldSol > 0>> <<set $workers.soldiers to _oldSol>> <<set _actualWorkerCount to (_actualWorkerCount - _oldSol)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldSol>> <<set $workers.soldiers to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldScav && _oldScav > 0>> <<set $workers.scavengers to _oldScav>> <<set _actualWorkerCount to (_actualWorkerCount - _oldScav)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldScav>> <<set $workers.scavengers to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldEngi && _oldEngi > 0>> <<set $workers.engineers to _oldEngi>> <<set _actualWorkerCount to (_actualWorkerCount - _oldEngi)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldEngi>> <<set $workers.engineers to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0 && _actualWorkerCount >= _oldScie && _oldScie > 0>> <<set $workers.scientists to _oldScie>> <<set _actualWorkerCount to (_actualWorkerCount - _oldScie)>> <<elseif _actualWorkerCount > 0 && _actualWorkerCount < _oldScie>> <<set $workers.scientists to _actualWorkerCount>> <<set _actualWorkerCount to 0>> <</if>> <<if _actualWorkerCount > 0>> <<set $workers.freePops to _actualWorkerCount>> <</if>> <</nobr>><</widget>>
<<nobr>> Add: <<if $workers.freePops >= 1>> <<link "1">> <<set $workers.freePops-->> <<set $workers.scavengers++>> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.freePops >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops - 5>> <<set $workers.scavengers to $workers.scavengers + 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.freePops >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops - 10>> <<set $workers.scavengers to $workers.scavengers + 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.freePops >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops - 20>> <<set $workers.scavengers to $workers.scavengers + 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.freePops >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops - 50>> <<set $workers.scavengers to $workers.scavengers + 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> Remove: <<if $workers.scavengers >= 1>> <<link "1">> <<set $workers.freePops++>> <<set $workers.scavengers-->> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.scavengers >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops + 5>> <<set $workers.scavengers to $workers.scavengers - 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.scavengers >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops + 10>> <<set $workers.scavengers to $workers.scavengers - 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.scavengers >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops + 20>> <<set $workers.scavengers to $workers.scavengers - 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.scavengers >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops + 50>> <<set $workers.scavengers to $workers.scavengers - 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> <<if $workers.freePops >= 1>> <<link "Add All">> <<set $workers.scavengers to $workers.scavengers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</link>> <<else>> Add All <</if>> | <<if $workers.scavengers > 0>> <<link "Remove All">> <<set $workers.freePops to $workers.freePops + $workers.scavengers>> <<set $workers.scavengers to 0>> <<goto "workers">> <</link>> <<else>> Remove All <</if>> <</nobr>>
<<set $turn++>> <<set $month++>> <<if $month >= 13>> <<set $year++>> <<set $month to 1>> <</if>> <<display "foodCalc">> <<display "scrapCalc">> <<display "popCalc">> <<display "gtCalc">> <<display "financeCalc">> <<display "securityCalc">> <<display "approvalCalc">> /* [[continue|turnReport]] */ <<goto "turnReport">>
Our scavengers were able to collect <<print Math.trunc($workers.scavengers * $baseScrapProd)>> units of scrap this month.
<<nobr>> /* Calculation */ <<set $city.scrap to Math.trunc($city.scrap + $workers.scavengers * $baseScrapProd)>> /* Scrap consumption */ <</nobr>>
This month, $newborn children joined the workforce, while $naturalDead citizens left the workforce due to age or death by natural causes. <<if $foodScarcity>>@@color:red;<<print $lostToHunger>>@@ citizens were lost to hunger.<</if>> <<if $migrants != 0>><<if $migrants < 0>><<set $migrants to $migrants * -1>> <<print $migrants>> people left the city.<<else>> <<print $migrants>> people migrated to the city.<</if>><</if>> <<if $popDiff < 0>><<set $popDiff to $popDiff * -1>> Overall, the city lost @@color:red;<<print $popDiff>>@@ citizens this month.<<else>>Overall, the city gained @@color:lightGreen;<<print $popDiff>>@@ citizens.<</if>> <<if $workerDiff != 0>>This month we <<if $old.pop > $city.pop>>had to disband @@color:red;<<print $workerDiff>>@@ squads of workers due to population loss.<<else>>managed to assemble @@color:lightGreen;<<print $workerDiff>>@@ new worker units.<</if>><</if>>
<<nobr>> /* Updating variables */ <<set $old.pop to $city.pop>> <<set $lostToHunger to 0>> <<set $newborn to 0>> <<set $naturalDead to 0>> <<set $migrants to 0>> <<set $migrationPush to 0>> <<set $workerDiff to 0>> /* Calculation */ /* famine */ <<if $foodScarcity>> <<set _percentDeficitAdjusted to Math.clamp($foodDeficit / $foodConsumed, 0, 0.1)>> <<set $lostToHunger to Math.trunc($city.pop * _percentDeficitAdjusted)>> <</if>> /* Births */ <<set $newborn to Math.trunc($city.pop * $basePopGrowth + random(-5,5))>> /* Natural deaths */ <<set $naturalDead to Math.trunc($city.pop * $basePopDeath + random(-5,5))>> /* Migration */ /* Negative migration will make people emigrate, positive will make people immigrate */ <<if $foodScarcity>> <<if $turnsOfFamine <= 5>> <<set $migrationPush to $migrationPush - $turnsOfFamine>> <<else>> <<set $migrationPush to $migrationPush + 5>> <</if>> <</if>> <<if $gt.fame > 0>> /* Every 20 points of giant's fame is an extra point of immigration */ <<set $migrationPush to $migrationPush + Math.trunc($gt.fame / 20)>> <</if>> <<if $gt.dread > 0>> /* Every 20 points of giant's dread is an extra point of emigration */ <<set $migrationPush to $migrationPush - Math.trunc($gt.dread / 20)>> <</if>> <<if $city.safety > 0>> /* Every 20 points of safety is an extra point of immigration */ <<set $migrationPush to $migrationPush + Math.trunc($city.safety / 20)>> <</if>> /* Migration push then becomes a percentage of the current population */ <<set $migrants to Math.trunc($city.pop * ($migrationPush / 500))>> /* Final calc */ <<set $popDiff to $newborn + $migrants - $naturalDead - $lostToHunger>> <<set $city.pop to $city.pop + $popDiff>> /* updating worker count */ <<if Math.trunc($old.pop / 100) != Math.trunc($city.pop / 100)>> <<readjustWorkers>> <</if>> <</nobr>>
<<if $growth > 0>>The <<print $gt.title>> has grown $growth feet this last month, bringing <<pp>> size.<<else>>The <<print $gt.title>> has not grown this month.<</if>><<if $satisfactionChange > 0>> The <<print $gt.title>>'s happiness @@color:lightGreen;improved@@ in these last few weeks.<<elseif $satisfactionChange < 0>> The <<print $gt.title>>'s happiness @@color:red;worsened@@ in these last few weeks.<</if>><<if $favorChange > 0>> Your favor with the $gt.title has @@color:lightGreen;increased@@ recently.<<elseif $favorChange < 0>> Your favor with the $gt.title has @@color:red;decreased@@ recently.<</if>><<if $wrathChange < 0>> The $gt.title's wrath towards you has @@color:lightGreen;softened@@.<<elseif $wrathChange > 0>> The $gt.title's wrath towards you @@color:red;intensified@@.<</if>>
<<nobr>> /* Updating variables */ <<updateServantsRequired>> <<set $satisfactionChange to 0>> <<set $favorChange to 0>> <<set $wrathChange to 0>> <<set $old.happiness to $gt.happiness>> /* Growth */ <<if !$foodScarcity>> <<set _growth to $baseGrowthRate + random(-1,1)>> <<set $gt.size to $gt.size + $baseGrowthRate>> <</if>> /* happiness */ /* food */ <<if $foodScarcity>> <<set $satisfactionChange to $satisfactionChange - $baseLackOfFoodHappinessDrop>> <</if>> /* Servants */ <<set _satisfactionRating to Math.clamp($workers.servants / $servantsRequired, 0, 2)>> /* if satisfaction is under the servants cap moderated by the actual servant count, then it grows by 0% to 10%, depending on the amount of servants */ /* otherwise it goes down by the default rate */ <<if $gt.happiness < _satisfactionRating * $servantsSatisfactionCap>> <<set $satisfactionChange to _satisfactionRating * 5>> <<elseif $gt.happiness != _satisfactionRating * $servantsSatisfactionCap && $gt.happiness > 0>> <<set $satisfactionChange to -1 * $baseHappinessDecayRate>> <</if>> /* Final calculation */ <<set $gt.happiness to Math.trunc(Math.clamp($gt.happiness + $satisfactionChange, 0, 100))>> /* Favor */ <<if $gt.happiness >= 60>> <<set $favorChange to $favorChange + Math.trunc(Math.clamp((100 - $gt.happiness) / 5 + 1, 1, 5))>> <</if>> <<set $gt.favor to Math.clamp($gt.favor + $favorChange - $baseFavorDecayRate, 0, 100)>> /* Wrath */ <<if $gt.happiness <= 40>> <<set $wrathChange to $wrathChange + Math.trunc(Math.clamp($gt.happiness / 5 + 1, 1, 5))>> <</if>> <<set $gt.wrath to Math.clamp($gt.wrath + $wrathChange - $baseWrathDecayRate, 0, 100)>> <</nobr>>
[WiP] [[ [Spacebar Back|mainWindow]]
!!The Farms <<updateFoodConsumption>>''Fields'': The city controls @@color:yellow;<<print $city.land>>@@ fertile fields. Each can employ a unit of workers, but you will need an extra unit of soldiers every $baseLandPerSoldier fields, to protect your territory effectively. Currently, our fields require @@color:yellow;<<print Math.trunc($city.land / $baseLandPerSoldier)>>@@ soldiers in total. With the current farming technology, the city needs @@color:yellow;<<print Math.trunc($foodConsumed / $baseFarmProd)>>@@ fields to feed its current population. You can schedule the clearing of new fields, or the abandonment of currently occupied ones. It will take a month for the work to be completed. <<display "fields buttons">> <<nobr>> <<if $clearFields > 0>>You are currently preparing @@color:yellow;<<print $clearFields>>@@ new fields<<elseif $abandonFields > 0>>You are currently planning to abandon @@color:yellow;<<print $abandonFields>>@@ fields. <</if>> <<if $clearFields != 0 or $abandonFields != 0>> <<link "CANCEL">> <<set $clearFields to 0>> <<set $abandonFields to 0>> <<goto "farms">> <</link>> <</if>> <</nobr>> ''Farmers'': The city currently employs @@color:yellow;<<print $workers.farmers>>@@ farmers. They can produce @@color:yellow;<<print Math.trunc($workers.farmers * $baseFarmProd)>>@@ units of food each month. The city need about @@color:yellow;<<print $foodConsumed>>@@ units of food each month. <<display "farmer buttons">> [[ [Spacebar] Back|mainWindow]]
[WiP] [[ [Spacebar Back|mainWindow]]
[WiP] [[ [Spacebar] Back|mainWindow]]
It is the year 2347. Three centuries ago, the old world was devastated, its population shattered, its monuments to technology and culture broken and buried. Humanity is a shadow of its former self: Where billions stood, now a sickly few remain. The end of the old world coincided with the emergence of the giants, humans with size to rival the Gods of the ancients. Their origin is unknown, as is their involvement in the fall of the old world. But what happened in the far past has little importance, the planet has a new apex species, and humanity finds itself forced to live in dark holes, or bend the knee and serve their titanic masters, trading freedom for protection from their peers. The world is a fragmented constellation of small kingdoms, controlled by a single giant who rules supreme, and the rare free enclave forever skulking away in the shadows, hoping for another day without giants. You lived in one of these, a free, if spartan existence. That is, until a young giant came, saw, and conquered your little slice of Earth. Seemingly uninterested in the day to day management of their newly aquired domain, the new ruler has tasked you with managing it in their name. You will have to keep the small town you call home from collapsing, and cater to the ever growing needs and desires of your new overlord. The penalty for failure, of course, is a painful death. [[Continue|customization]] [[Skip|mainWindow]]
The $gt.title never revealed <<pp>> true name to you. You never really needed to know anyway, since <<p>> prohibited anyone from using anything else than <<pp>> chosen title when referring to <<po>>. ''Sex'':<<nobr>> <<sexC>> | <<link "Switch">> <<if $gt.sex == "female">> <<set $gt.sex to "male">> <<set $gt.title to "Lord">> <<goto "customization">> <<else>> <<set $gt.sex to "female">> <<set $gt.title to "Lady">> <<goto "customization">> <</if>> <</link>> <</nobr>> ''Title'': <<nobr>><<if $gt.sex == "female">> <<listbox "$gt.title" autoselect>> <<option "Lady">> <<option "Empress">> <<option "Queen">> <<option "Princess">> <<option "Duchess">> <<option "Giantess">> <<option "Governess">> <<option "Mistress">> <<option "Ruler">> <<option "Overlord">> <<option "Guardian">> <</listbox>> <<else>> <<listbox "$gt.title" autoselect>> <<option "Lord">> <<option "Emperor">> <<option "King">> <<option "Prince">> <<option "Giant">> <<option "Duke">> <<option "Governor">> <<option "Master">> <<option "Ruler">> <<option "Overlord">> <<option "Guardian">> <</listbox>> <</if>><</nobr>> ''Name'': <<textbox "$gt.name" "Unknown">> //Note: Hit enter to confirm the name// While you may have questions about <<pp>> moral fiber, questions that you take care to keep for yourself, you cannot deny <<p>> is a <<if $gt.sex is "female">>beautiful<<else>> handsome<</if>> <<gender>>. What always strikes you the most about <<pp>>, however is <<pp>>: <<nobr>> <<if $physicalTrait != "girth">> <<link "Impressive Girth">> <<set $physicalTrait to "girth">> <<goto "customization">> <</link>> <<else>> Impressive Girth <</if>>| <<if $physicalTrait != "muscles">> <<link "Powerful Musculature">> <<set $physicalTrait to "muscles">> <<goto "customization">> <</link>> <<else>> Powerful Musculature <</if>>| <<if $gt.sex is "female">> <<if $physicalTrait != "chest">> <<link "Generous Chest">> <<set $physicalTrait to "chest">> <<goto "customization">> <</link>> <<else>> Generous Chest <</if>>| <<else>> <<if $physicalTrait != "dick">> <<link "Large Member">> <<set $physicalTrait to "dick">> <<goto "customization">> <</link>> <<else>> Large Member <</if>>| <</if>> <<if $physicalTrait != "ass">> <<link "Considerable Behind">> <<set $physicalTrait to "ass">> <<goto "customization">> <</link>> <<else>> Considerable Behind <</if>> <</nobr>> <<link "Continue">> <<if $physicalTrait is "girth">> <<set $gt.weight to 75>> <<elseif $physicalTrait is "muscles">> <<set $gt.muscles to 75>> <<elseif $physicalTrait is "chest">> <<set $gt.boobs to 75>> <<elseif $physicalTrait is "dick">> <<set $gt.dick to 75>> <<else>> <<set $gt.ass to 75>> <</if>> <<goto "history">> <</link>>
Before <<p>> came to the town you call home, it was a free territory, one of the last. Everyone knew it was only a matter of time before a giant would claim it from themselves, but they all still hoped your little island of peace would last forever. Of course, it was not the case. The $gt.title is young and small, for a giant. <<pc>> came from the east looking for a place to call <<pp>> own, where <<p>> could grow <<pp>> power in peace, away from the cutthroat life of the more densely populated regions. City name: <<textbox "$city.name" "Dustspring">> [Placeholder for trait selection] [[Continue|mainWindow]]
[WiP] [[ [Spacebar] Back|mainWindow]]
[WiP] [[ [Spacebar] Back|mainWindow]]
The city's coffers this month have grown by @@color:lightGreen;<<print Math.trunc($income)>>@@ units of gold.
<<nobr>> /* update relevant variables */ <<set $taxRevenue to 0>> <<set $farmTax to 0>> <<set $scavTax to 0>> <<set $serviceTax to 0>> <<set $soldierTax to 0>> <<set $engineerTax to 0>> <<set $scientistTax to 0>> <<set $freePopTax to 0>> <<set $income to 0>> /* taxation */ <<set $farmTax to ($workers.farmers * $baseFarmerTax)>> <<set $scavTax to ($workers.scavengers * $baseScavengerTax)>> <<set $serviceTax to ($workers.service * $baseServiceTax)>> <<set $soldierTax to ($workers.soldiers * $baseSoldierTax)>> <<set $engineerTax to ($workers.engineers * $baseEngineerTax)>> <<set $scientistTax to ($workers.scientists * $baseScientistTax)>> <<set $freePopTax to ($workers.freePops * $baseFreePopTax)>> <<set $taxRevenue to ($farmTax + $scavTax + $serviceTax + $soldierTax + $engineerTax + $scientistTax + $freePopTax)>> /* upkeep */ /* Final calculation */ <<set $income to $taxRevenue>> <<set $city.money to $city.money + $income>> <</nobr>>
<<print $year>>, <<month>> Turn <<print $turn>> The $gt.title: Size: <<print Math.trunc($gt.size)>> feet Happiness: <<nobr>> <<if $gt.happiness == 0>> @@color:red;<<print $gt.happiness>>/100@@ <<elseif $gt.happiness == 100>> @@color:lightGreen;<<print $gt.happiness>>/100@@ <<else>> <<print $gt.happiness>>/100 <</if>> <<if $gt.happiness > $old.happiness>> (@@color:lightGreen;<<print $gt.happiness - $old.happiness>>@@) <<elseif $gt.happiness < $old.happiness>> (@@color:red;<<print $gt.happiness - $old.happiness>>@@) <<else>> (@@color:yellow;0@@) <</if>><</nobr>> Mood: $gt.mood Favor: $gt.favor Wrath: $gt.wrath $city.name: Population: $city.pop Approval: <<nobr>> <<if $city.approval == 0>> @@color:red;<<print $city.approval>>/100@@ <<elseif $city.approval == 100>> @@color:lightGreen;<<print $city.approval>>/100@@ <<else>> <<print $city.approval>>/100 <</if>> <<if $city.approval > $old.approval>> (@@color:lightGreen;<<print $city.approval - $old.approval>>@@) <<elseif $city.approval < $old.approval>> (@@color:red;<<print $city.approval - $old.approval>>@@) <<else>> (@@color:yellow;0@@) <</if>><</nobr>> Safety: <<nobr>> <<if $city.safety == 0>> @@color:red;<<print $city.safety>>/100@@ <<elseif $city.safety == 100>> @@color:lightGreen;<<print $city.safety>>/100@@ <<else>> <<print $city.safety>>/100 <</if>> <<if $city.safety > $old.safety>> (@@color:lightGreen;<<print $city.safety - $old.safety>>@@) <<elseif $city.safety < $old.safety>> (@@color:red;<<print $city.safety - $old.safety>>@@) <<else>> (@@color:yellow;0@@) <</if>><</nobr>> Food Balance: <<if $foodProduced - $foodConsumed < 0>>@@color:red;<<print $foodProduced - $foodConsumed>><<else>>@@color:lightGreen;<<print $foodProduced - $foodConsumed>><</if>> Food Reserves: $city.foodStored Scrap: $city.scrap
<<widget areReqMatched>><<nobr>> <<updateFoodConsumption>> <<updateServantsRequired>> <<updateSoldiersRequired>> <<updateServiceRequired>> <<set $areReqMatched to true>> <<if $farmersRequired > $workers.farmers>> <<set $areReqMatched to false>> <<elseif $servantsRequired > $workers.servants>> <<set $areReqMatched to false>> <<elseif $serviceRequired > $workers.service>> <<set $areReqMatched to false>> <<elseif $soldiersRequired > $workers.soldiers>> <<set $areReqMatched to false>> <</if>> <</nobr>><</widget>> <<widget month>><<nobr>> <<if $month is 1>> January <<elseif $month is 2>> February <<elseif $month is 3>> March <<elseif $month is 4>> April <<elseif $month is 5>> May <<elseif $month is 6>> June <<elseif $month is 7>> July <<elseif $month is 8>> August <<elseif $month is 9>> September <<elseif $month is 10>> October <<elseif $month is 11>> November <<elseif $month is 12>> December <<else>> Error <</if>> <</nobr>><</widget>>
[WiP] [[ [Spacebar] Back|mainWindow]]
<<nobr>> /* Update relevant variables */ <<updateSoldiersRequired>> Add: <<if $workers.freePops >= 1>> <<link "1">> <<set $workers.freePops-->> <<set $workers.soldiers++>> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.freePops >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops - 5>> <<set $workers.soldiers to $workers.soldiers + 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.freePops >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops - 10>> <<set $workers.soldiers to $workers.soldiers + 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.freePops >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops - 20>> <<set $workers.soldiers to $workers.soldiers + 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.freePops >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops - 50>> <<set $workers.soldiers to $workers.soldiers + 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>>Remove: <<if $workers.soldiers >= 1>> <<link "1">> <<set $workers.freePops++>> <<set $workers.soldiers-->> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.soldiers >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops + 5>> <<set $workers.soldiers to $workers.soldiers - 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.soldiers >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops + 10>> <<set $workers.soldiers to $workers.soldiers - 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.soldiers >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops + 20>> <<set $workers.soldiers to $workers.soldiers - 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.soldiers >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops + 50>> <<set $workers.soldiers to $workers.soldiers - 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> <<if $soldiersRequired > $workers.soldiers && $workers.freePops >= ($soldiersRequired - $workers.soldiers)>> <<link "Auto">> <<if $workers.freePops > ($soldiersRequired - $workers.soldiers)>> <<set $workers.freePops to $workers.freePops - ($soldiersRequired - $workers.soldiers)>> <<set $workers.soldiers to $soldiersRequired>> <<goto "workers">> <<else>> <<set $workers.soldiers to $workers.soldiers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</link>> <<else>> Auto <</if>>| <<if $workers.freePops >= 1>> <<link "Add All">> <<set $workers.soldiers to $workers.soldiers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</link>> <<else>> Add All <</if>> | <<if $workers.soldiers > 0>> <<link "Empty">> <<set $workers.freePops to $workers.freePops + $workers.soldiers>> <<set $workers.soldiers to 0>> <<goto "workers">> <</link>> <<else>> Remove All <</if>> <</nobr>>
<<nobr>><<if $approvalChange > 0>>The citizens approve of your administration, your popularity has @@color:lightGreen;increased@@ this month<<elseif $approvalChange < 0>>The citizens are not happy about your policies, your popularity has @@color:red;decreased@@ this month<<else>>There were @@color:yellow;no major changes@@ to your popularity this month<</if>>.<</nobr>> <<nobr>>The city this month has <<if $safetyChange > 0>>become @@color:lightGreen;more secure@@<<else>>become @@color:red;less secure@@<</if>>. <<if $soldiersRequired < $workers.soldiers>>There are plenty of soldiers patrolling the city's borders.<<if $safety < $soldiersSafetyCap>> Soon bandits and roaming animals will become a distant threat.<</if>><<elseif $soldiersRequired == $workers.soldiers>>There are enough soldiers to guarantee a decent amount of protection to the citizens.<<if $safety < $soldiersSafetyCap>> The threat in the countryside and the slums will slowly disappear.<</if>><<else>>There are not enough soldiers to protect the city and its land, the situation is bound to worsen eventually.<</if>><</nobr>>
<<nobr>> /* updating relevant variables */ <<updateSoldiersRequired>> <<updateServiceRequired>> <<set $safetyChange to 0>> <<set $approvalChange to 0>> <<set $old.safety to $city.safety>> <<set $old.approval to $city.approval>> /* safety */ <<set _safetyRating to Math.clamp($workers.soldiers / $soldiersRequired, 0, 2)>> /* _safetyRating determines how fast safety grows, from 0 (with 0 soldiers) to 2 (with double the required amount or more) */ <<if $city.safety < _safetyRating * $soldiersSafetyCap>> <<set $safetyChange to _safetyRating * 5>> <<elseif $city.safety != _safetyRating * $soldiersSafetyCap && $city.safety > 0>> <<set $safetyChange to -1 * $baseSafetyDecayRate>> <</if>> /* approval */ <<set _approvalRating to Math.clamp($workers.service / $serviceRequired, 0, 2)>> /* _approvalRating determines how fast approval grows, from 0 (with 0 soldiers) to double (with double the required amount or more) */ <<if $city.approval < _approvalRating * $soldiersSafetyCap>> <<set $approvalChange to _approvalRating * 5>> <<elseif $city.approval != _approvalRating * $soldiersSafetyCap && $city.approval > 0>> <<set $approvalChange to -1 * $baseSafetyDecayRate>> <</if>> /* Famine */ <<if $foodScarcity>> <<set _lossDueToFoodScarcity to Math.clamp($foodConsumed / ($city.foodStored + $foodProduced) * 10, 0, 20)>> <<set $approvalChange to $approvalChange - _lossDueToFoodScarcity>> <</if>> /* Final calculation */ <<set $city.safety to Math.trunc(Math.clamp($city.safety + $safetyChange,0,100))>> <<set $city.approval to Math.trunc(Math.clamp($city.approval + $approvalChange, 0, 100))>> <</nobr>>
<<widget checkWorkerCount>><<nobr>> <<set _expectedWorkerCount to Math.trunc($city.pop / 100)>> <<set _workerCount to $workers.freePops + $workers.farmers + $workers.scavengers + $workers.engineers + $workers.scientists + $workers.servants + $workers.service + $workers.soldiers>> <<if _workerCount != _expectedWorkerCount>> @@color:red;ERROR: unexpected worker count@@ Expected: <<print _expectedWorkerCount>> Obtained: <<print _workerCount>> <</if>> <</nobr>><</widget>>
<<nobr>> /* Update relevant variables */ <<updateServantsRequired>> Add: <<if $workers.freePops >= 1>> <<link "1">> <<set $workers.freePops-->> <<set $workers.servants++>> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.freePops >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops - 5>> <<set $workers.servants to $workers.servants + 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.freePops >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops - 10>> <<set $workers.servants to $workers.servants + 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.freePops >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops - 20>> <<set $workers.servants to $workers.servants + 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.freePops >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops - 50>> <<set $workers.servants to $workers.servants + 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>>Remove: <<if $workers.servants >= 1>> <<link "1">> <<set $workers.freePops++>> <<set $workers.servants-->> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.servants >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops + 5>> <<set $workers.servants to $workers.servants - 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.servants >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops + 10>> <<set $workers.servants to $workers.servants - 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.servants >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops + 20>> <<set $workers.servants to $workers.servants - 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.servants >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops + 50>> <<set $workers.servants to $workers.servants - 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> <<if $servantsRequired > $workers.servants && $workers.freePops >= ($servantsRequired - $workers.servants)>> <<link "Auto">> <<if $workers.freePops > ($servantsRequired - $workers.servants)>> <<set $workers.freePops to $workers.freePops - ($servantsRequired - $workers.servants)>> <<set $workers.servants to $servantsRequired>> <<goto "workers">> <<else>> <<set $workers.servants to $workers.servants + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</link>> <<else>> Auto <</if>>| <<if $workers.freePops >= 1>> <<link "Add All">> <<set $workers.servants to $workers.servants + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</link>> <<else>> Add All <</if>> <<if $workers.servants > 0>> <<link "Remove All">> <<set $workers.freePops to $workers.freePops + $workers.servants>> <<set $workers.servants to 0>> <<goto "workers">> <</link>> <<else>> Remove All <</if>> <</nobr>>
<<nobr>> /* Update relevant variables */ <<updateServiceRequired>> Add: <<if $workers.freePops >= 1>> <<link "1">> <<set $workers.freePops-->> <<set $workers.service++>> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.freePops >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops - 5>> <<set $workers.service to $workers.service + 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.freePops >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops - 10>> <<set $workers.service to $workers.service + 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.freePops >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops - 20>> <<set $workers.service to $workers.service + 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.freePops >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops - 50>> <<set $workers.service to $workers.service + 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>>Remove: <<if $workers.service >= 1>> <<link "1">> <<set $workers.freePops++>> <<set $workers.service-->> <<goto "workers">> <</link>> <<else>> 1 <</if>>| <<if $workers.service >= 5>> <<link "5">> <<set $workers.freePops to $workers.freePops + 5>> <<set $workers.service to $workers.service - 5>> <<goto "workers">> <</link>> <<else>> 5 <</if>>| <<if $workers.service >= 10>> <<link "10">> <<set $workers.freePops to $workers.freePops + 10>> <<set $workers.service to $workers.service - 10>> <<goto "workers">> <</link>> <<else>> 10 <</if>>| <<if $workers.service >= 20>> <<link "20">> <<set $workers.freePops to $workers.freePops + 20>> <<set $workers.service to $workers.service - 20>> <<goto "workers">> <</link>> <<else>> 20 <</if>>| <<if $workers.service >= 50>> <<link "50">> <<set $workers.freePops to $workers.freePops + 50>> <<set $workers.service to $workers.service - 50>> <<goto "workers">> <</link>> <<else>> 50 <</if>> <</nobr>> <<nobr>> <<if $serviceRequired > $workers.service && $workers.freePops >= ($serviceRequired - $workers.service)>> <<link "Auto">> <<if $workers.freePops > ($serviceRequired - $workers.service)>> <<set $workers.freePops to $workers.freePops - ($serviceRequired - $workers.service)>> <<set $workers.service to $serviceRequired>> <<goto "workers">> <<else>> <<set $workers.service to $workers.service + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</link>> <<else>> Auto <</if>>| <<if $workers.freePops >= 1>> <<link "Add All">> <<set $workers.service to $workers.service + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</link>> <<else>> Add All <</if>> | <<if $workers.service > 0>> <<link "Remove All">> <<set $workers.freePops to $workers.freePops + $workers.service>> <<set $workers.service to 0>> <<goto "workers">> <</link>> <<else>> Remove All <</if>> <</nobr>>
<<nobr>> <<link "Add 1">> <<if $abandonFields >= 1>> <<set $abandonFields to $abandonFields - 1>> <<goto "farms">> <<else>> <<set $clearFields to $clearFields + 1>> <<goto "farms">> <</if>> <</link>> | <<link "Add 5">> <<set _fields to 5>> <<if $abandonFields >= _fields>> <<set $abandonFields to $abandonFields - _fields>> <<goto "farms">> <<elseif $abandonFields > 0>> <<set _fields to _fields - $abandonFields>> <<set $abandonFields to 0>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <<else>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <</if>> <</link>> | <<link "Add 10">> <<set _fields to 10>> <<if $abandonFields >= _fields>> <<set $abandonFields to $abandonFields - _fields>> <<goto "farms">> <<elseif $abandonFields > 0>> <<set _fields to _fields - $abandonFields>> <<set $abandonFields to 0>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <<else>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <</if>> <</link>> | <<link "Add 20">> <<set _fields to 20>> <<if $abandonFields >= _fields>> <<set $abandonFields to $abandonFields - _fields>> <<goto "farms">> <<elseif $abandonFields > 0>> <<set _fields to _fields - $abandonFields>> <<set $abandonFields to 0>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <<else>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <</if>> <</link>> | <<link "Add 50">> <<set _fields to 50>> <<if $abandonFields >= _fields>> <<set $abandonFields to $abandonFields - _fields>> <<goto "farms">> <<elseif $abandonFields > 0>> <<set _fields to _fields - $abandonFields>> <<set $abandonFields to 0>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <<else>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <</if>> <</link>> | <<link "Add 100">> <<set _fields to 100>> <<if $abandonFields >= _fields>> <<set $abandonFields to $abandonFields - _fields>> <<goto "farms">> <<elseif $abandonFields > 0>> <<set _fields to _fields - $abandonFields>> <<set $abandonFields to 0>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <<else>> <<set $clearFields to $clearFields + _fields>> <<goto "farms">> <</if>> <</link>> | <<if (Math.trunc($foodConsumed / $baseFarmProd) + ($clearFields - $abandonFields)) != $city.land>> <<link "Match Requirement">> <<set $clearFields to 0>> <<set $abandonFields to 0>> <<set _fields to Math.trunc($foodConsumed / $baseFarmProd)>> <<if $city.land > _fields>> <<set $abandonFields to ($city.land - _fields)>> <<goto "farms">> <<else>> <<set $clearFields to ($city.land - _fields)>> <<goto "farms">> <</if>> <</link>> <<else>> Match requirement <</if>> <</nobr>> <<nobr>> <<if $city.land >= 1 + $abandonFields>> <<link "Remove 1">> <<set _fields to 1>> <<if $clearFields >= _fields>> <<set $clearFields to $clearFields - _fields>> <<goto "farms">> <<elseif $clearFields > 0>> <<set _fields to _fields - $clearFields>> <<set $clearFields to 0>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <<else>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <</if>> <</link>> <<else>> Remove 1 <</if>> | <<if $city.land >= 5 + $abandonFields>> <<link "Remove 5">> <<set _fields to 5>> <<if $clearFields >= _fields>> <<set $clearFields to $clearFields - _fields>> <<goto "farms">> <<elseif $clearFields > 0>> <<set _fields to _fields - $clearFields>> <<set $clearFields to 0>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <<else>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <</if>> <</link>> <<else>> Remove 5 <</if>> | <<if $city.land >= 10 + $abandonFields>> <<link "Remove 10">> <<set _fields to 10>> <<if $clearFields >= _fields>> <<set $clearFields to $clearFields - _fields>> <<goto "farms">> <<elseif $clearFields > 0>> <<set _fields to _fields - $clearFields>> <<set $clearFields to 0>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <<else>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <</if>> <</link>> <<else>> Remove 10 <</if>> | <<if $city.land >= 20 + $abandonFields>> <<link "Remove 20">> <<set _fields to 20>> <<if $clearFields >= _fields>> <<set $clearFields to $clearFields - _fields>> <<goto "farms">> <<elseif $clearFields > 0>> <<set _fields to _fields - $clearFields>> <<set $clearFields to 0>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <<else>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <</if>> <</link>> <<else>> Remove 20 <</if>> | <<if $city.land >= 50 + $abandonFields>> <<link "Remove 50">> <<set _fields to 50>> <<if $clearFields >= _fields>> <<set $clearFields to $clearFields - _fields>> <<goto "farms">> <<elseif $clearFields > 0>> <<set _fields to _fields - $clearFields>> <<set $clearFields to 0>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <<else>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <</if>> <</link>> <<else>> Remove 50 <</if>> | <<if $city.land >= 100 + $abandonFields>> <<link "Remove 100">> <<set _fields to 100>> <<if $clearFields >= _fields>> <<set $clearFields to $clearFields - _fields>> <<goto "farms">> <<elseif $clearFields > 0>> <<set _fields to _fields - $clearFields>> <<set $clearFields to 0>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <<else>> <<set $abandonFields to $abandonFields + _fields>> <<goto "farms">> <</if>> <</link>> <<else>> Remove 100 <</if>> <</nobr>>
[WiP] [[ [Spacebar] Back|mainWindow]]
<<nobr>> /* quick update to relevant variables */ <<updateFoodConsumption>> /* buttons */ <<if $workers.freePops >= 1 && ($workers.farmers + 1) <= $city.land>> <<link "Add 1">> <<set $workers.freePops-->> <<set $workers.farmers++>> <<goto "farms">> <</link>> <<else>> Add 1 <</if>>| <<if $workers.freePops >= 5 && ($workers.farmers + 5) <= $city.land>> <<link "Add 5">> <<set $workers.freePops to $workers.freePops - 5>> <<set $workers.farmers to $workers.farmers + 5>> <<goto "farms">> <</link>> <<else>> Add 5 <</if>>| <<if $workers.freePops >= 10 && ($workers.farmers + 10) <= $city.land>> <<link "Add 10">> <<set $workers.freePops to $workers.freePops - 10>> <<set $workers.farmers to $workers.farmers + 10>> <<goto "farms">> <</link>> <<else>> Add 10 <</if>>| <<if $workers.freePops >= 20 && ($workers.farmers + 20) <= $city.land>> <<link "Add 20">> <<set $workers.freePops to $workers.freePops - 20>> <<set $workers.farmers to $workers.farmers + 20>> <<goto "farms">> <</link>> <<else>> Add 20 <</if>>| <<if $workers.freePops >= 50 && ($workers.farmers + 50) <= $city.land>> <<link "Add 50">> <<set $workers.freePops to $workers.freePops - 50>> <<set $workers.farmers to $workers.farmers + 50>> <<goto "farms">> <</link>> <<else>> Add 50 <</if>>| <<if $workers.freePops >= 100 && ($workers.farmers + 100) <= $city.land>> <<link "Add 100">> <<set $workers.freePops to $workers.freePops - 100>> <<set $workers.farmers to $workers.farmers + 100>> <<goto "farms">> <</link>> <<else>> Add 100 <</if>>| <<if $farmersRequired > $workers.farmers && $workers.freePops >= $farmersRequired && $workers.farmers < $city.land && $farmersRequired <= $city.land>> <<link "Match food consumption">> <<if $workers.freePops > ($farmersRequired - $workers.farmers)>> <<set $workers.freePops to $workers.freePops - ($farmersRequired - $workers.farmers)>> <<set $workers.farmers to $farmersRequired>> <<goto "farms">> <<else>> <<set $workers.farmers to $workers.farmers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "farms">> <</if>> <</link>> <<else>> Match food consumption <</if>>| <<if $workers.freePops >= 1 && $workers.farmers < $city.land>> <<link "Fill">> <<if $workers.freePops > ($city.land - $workers.farmers)>> <<set $workers.freePops to $workers.freePops - ($city.land - $workers.farmers)>> <<set $workers.farmers to $city.land>> <<goto "farms">> <<else>> <<set $workers.farmers to $workers.farmers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "farms">> <</if>> <</link>> <<else>> Fill <</if>> <</nobr>> <<nobr>> <<if $workers.farmers >= 1>> <<link "Remove 1">> <<set $workers.freePops++>> <<set $workers.farmers-->> <<goto "farms">> <</link>> <<else>> Add 1 <</if>>| <<if $workers.farmers >= 5>> <<link "Remove 5">> <<set $workers.freePops to $workers.freePops + 5>> <<set $workers.farmers to $workers.farmers - 5>> <<goto "farms">> <</link>> <<else>> Add 5 <</if>>| <<if $workers.farmers >= 10>> <<link "Remove 10">> <<set $workers.freePops to $workers.freePops + 10>> <<set $workers.farmers to $workers.farmers - 10>> <<goto "farms">> <</link>> <<else>> Remove 10 <</if>>| <<if $workers.farmers >= 20>> <<link "Remove 20">> <<set $workers.freePops to $workers.freePops + 20>> <<set $workers.farmers to $workers.farmers - 20>> <<goto "farms">> <</link>> <<else>> Remove 20 <</if>>| <<if $workers.farmers >= 50>> <<link "Remove 50">> <<set $workers.freePops to $workers.freePops + 50>> <<set $workers.farmers to $workers.farmers - 50>> <<goto "farms">> <</link>> <<else>> Remove 50 <</if>>| <<if $workers.farmers >= 100>> <<link "Remove 100">> <<set $workers.freePops to $workers.freePops + 100>> <<set $workers.farmers to $workers.farmers - 100>> <<goto "farms">> <</link>> <<else>> Remove 100 <</if>>| <<if $workers.farmers > 0>> <<link "Empty">> <<set $workers.freePops to $workers.freePops + $workers.farmers>> <<set $workers.farmers to 0>> <<goto "farms">> <</link>> <<else>> Empty <</if>> <</nobr>>
<<nobr>> <<if $workers.freePops < Math.trunc($city.pop / 100)>> <<link "Unassign All">> <<set $workers.freePops to Math.trunc($city.pop / 100)>> <<set $workers.farmers to 0>> <<set $workers.service to 0>> <<set $workers.scavengers to 0>> <<set $workers.servants to 0>> <<set $workers.engineers to 0>> <<set $workers.soldiers to 0>> <<set $workers.scientists to 0>> <<goto "workers">> <</link>> <<else>> Unassign All <</if>> <</nobr>> <<nobr>> <<if $workers.freePops > 0>> <<areReqMatched>> <</if>> <<if $areReqMatched is false && $workers.freePops > 0>> <<link "Autoassign">> <<if $farmersRequired > $workers.farmers>> <<if $workers.freePops > ($farmersRequired - $workers.farmers)>> <<set $workers.freePops to $workers.freePops - ($farmersRequired - $workers.farmers)>> <<set $workers.farmers to $farmersRequired>> <<goto "workers">> <<else>> <<set $workers.farmers to $workers.farmers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</if>> <<if $servantsRequired > $workers.servants && $workers.freePops > 0>> <<if $workers.freePops > ($servantsRequired - $workers.servants)>> <<set $workers.freePops to $workers.freePops - ($servantsRequired - $workers.servants)>> <<set $workers.servants to $servantsRequired>> <<goto "workers">> <<else>> <<set $workers.servants to $workers.servants + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</if>> <<if $serviceRequired > $workers.service && $workers.freePops > 0>> <<if $workers.freePops > ($serviceRequired - $workers.service)>> <<set $workers.freePops to $workers.freePops - ($serviceRequired - $workers.service)>> <<set $workers.service to $serviceRequired>> <<goto "workers">> <<else>> <<set $workers.service to $workers.service + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</if>> <<if $soldiersRequired > $workers.soldiers && $workers.freePops > 0>> <<if $workers.freePops > ($soldiersRequired - $workers.soldiers)>> <<set $workers.freePops to $workers.freePops - ($soldiersRequired - $workers.soldiers)>> <<set $workers.soldiers to $soldiersRequired>> <<goto "workers">> <<else>> <<set $workers.soldiers to $workers.soldiers + $workers.freePops>> <<set $workers.freePops to 0>> <<goto "workers">> <</if>> <</if>> <</link>> <<else>> Autoassign <</if>> <</nobr>>
<<updateAllRequired>> <div class="grid-container"> <div class="grid-item"> ''Farmers'': @@color:yellow;<<print $workers.farmers>>@@/@@color:yellow;<<print $farmersRequired>>@@. Max farmers: $city.land <<display "farm buttons">> </div> <div class="grid-item"> ''Scavenging'': Collecting scrap from the old world ruins. Currently, $workers.scavengers worker units are assigned to scavenge duty. They can produce around <<print Math.trunc($workers.scavengers * $baseScrapProd)>> units of scrap per month. <<display "scrap buttons">> </div> <div class="grid-item"> ''Military'': To effectively protect the city and its rural land, you need about <<print Math.trunc($city.land / $baseLandPerSoldier) + Math.trunc($city.pop / $basePopPerSoldier)>> squads of soldiers. Currently, $workers.soldiers squads are out patrolling. <<display "soldier buttons">> </div> <div class="grid-item"> ''City Services'': Service workers are workers dedicated to the wellbeing of the citizens: Cleaners, cooks, teachers, doctors, and more. The city needs <<print Math.trunc($city.pop / $basePopPerService)>> service worker teams to function well. Currently, it employs <<print $workers.service>>. <<display "service buttons">> </div> <div class="grid-item"> ''The $gt.title Servants'': For <<pp>> personal care, the $gt.title requires <<print Math.trunc($gt.size / $baseFeetPerServant)>> squads of servants. Currently $workers.servants are assigned to <<pp>>. <<display "servant buttons">> </div> <div class="grid-item"> scientists </div> <div class="grid-item"> engineers </div> <div class="grid-item"> Free worker units: @@color:yellow;<<print $workers.freePops>>@@ <<display "general worker buttons">> </div> </div>
<<set $Strength to 5>> <<numberinput "$Strength" $Strength 1 20>> <<set $opacity to 1>> <<numberslider "$opacity" $opacity 0 10 0.5>> <<set $StatPool to 30, $ST to 1, $DX to 10, $IQ to 1, $HT to 1>> You have <span id="stat-pool">$StatPool</span> points remaining to allocate. <<numberpool "$StatPool">> |''ST:''|<<numberinput "$ST" $ST 1 $DX>>| |''DX:''|<<numberinput "$DX" $DX 1 20>>| |''IQ:''|<<numberinput "$IQ" $IQ 1 20>>| |''HT:''|<<numberinput "$HT" $HT 1 20>>| <<onchange>> <<replace "#stat-pool">>$StatPool<</replace>> <</numberpool>>
<<on keyup once>> /* Spacebar */ <<which 32>> <<if tags().includes('menu')>> <<goto "mainWindow">> <</if>> /* Enter */ <<which 13>> <<if tags().includes('mainWindow')>> <<goto "turnHandler">> <</if>> <<which 49>> <<if tags().includes('mainWindow')>> <<goto "palace">> <</if>> <<which 50>> <<if tags().includes('mainWindow')>> <<goto "laws">> <</if>> <<which 51>> <<if tags().includes('mainWindow')>> <<goto "security">> <</if>> <<which 52>> <<if tags().includes('mainWindow')>> <<goto "finance">> <</if>> <<which 53>> <<if tags().includes('mainWindow')>> <<goto "farms">> <</if>> <<which 54>> <<if tags().includes('mainWindow')>> <<goto "industry">> <</if>> <<which 55>> <<if tags().includes('mainWindow')>> <<goto "city">> <</if>> <<which 56>> <<if tags().includes('mainWindow')>> <<goto "tech">> <</if>> <<which 57>> <<if tags().includes('mainWindow')>> <<goto "workers">> <</if>> <</on>>
<<if tags().includes('mainWindow')>> <<link "End Turn">> <<goto "turnHandler">> <</link>> <</if>>